{% extends 'siteAdmin/index.html' %}
{% block operation %}
{% if req.path ==pageData['subdomain'].template|nonone +'/siteAdmin/fileAdd' %}

        <div id="box">
        {% if pageData['feed'].id %}
            <form method ="POST" action="{{pageData['subdomain']}}/siteAdmin/feedAdd?update={{pageData['feed'].id}}">
        {% else %}
            <form  method="POST" action="{{pageData['subdomain']}}/siteAdmin/feedAdd?add">
        {% endif %}

                <span class="word">titolo</span><br />
                <span class="insert">
                <input name="name" type="text" value ="{{pageData['feed'].name|nonone}}" style="width: 80%"/></span><br /><br />
                <span class="word">URL</span><br />
                <span class="insert">
                <input name="url" type="text" value ="{{pageData['feed'].url|nonone}}" style="width: 80%"/></span><br /><br />
                            <div class="row thin lineTop"><br /><br />
                <input type="submit" class="wymupdate" value="Aggiungi/modifica"/>
            </form>
            <br />

        </div>
    {% elif req.path ==pageData['subdomain'].templates|nonone+'/siteAdmin/fileList' %}
        <div id="box">
                <span class="testa"><h2>Gestione file</h2></span>
                <hr></hr>
                <div class="row normal">
                <a href="{{pageData['subdomain']}}/siteAdmin/feedAdd?new">
                    <img src="/templates/siteAdmin/img/add.png" alt="aggiungi una sorgente feed" title="aggiungi una sorgente feed"/>
                </a>
                </div>
                {% for t in pageData['filedir'] %}
                    {{t}}<br />
                    {% for f in t[2] %}
                       <a href="#"><img src="/templates/media/{{t[1]}}/{{f}}"/></a><p>/templates/media/{{t[1]}}/{{f}}</p>
                    {% endfor %}
                {% endfor %}
                <div class="row normal lineTop">
                <a href="{{pageData['subdomain']}}/siteAdmin/feedAdd?new">
                    <img src="/templates/siteAdmin/img/add.png" alt="aggiungi una pagina" title="aggiungi una pagina"/>
                </a>
                </div>
        </div>

{% endif %}
        </div>
{%endblock%}
